#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>
#include<string.h>
#include<assert.h>


void* My_memset(void* ptr, int value, size_t num)
{
	assert(ptr != NULL);
	char* str = (char*)ptr;
	int i = 0;
	for (i = 0; i < num; i++)
	{
		*str = value;
		str++;
	}
	return ptr;
}


int main()
{
	char str[] = "almost every programmer should know memset!";
	My_memset(str, '-', 6);
	puts(str);
	return 0;
}